<#-- 这是一个 FreeMarker 模板文件 -->
from flask import Blueprint, Flask
import pyvisa


${device} = Blueprint('${device}', __name__)

<#list commands as command>
    @${device}.route('/${command.name}', methods=['GET', 'POST'])
    def ${command.name!'Unknown'}(<#if command.args?has_content><#list command.args as arg><#if arg?index!=0>,</#if>${arg}</#list></#if>):
    return "Welcome to the Home Page!"

</#list>


if __name__ == '__main__':
app = Flask(__name__)
app.register_blueprint(${device})
app.run()
